//
//  NoticeCell.m
//  Contacts
//
//  Created by 李 雷川 on 14-7-15.
//  Copyright (c) 2014年 李 雷川. All rights reserved.
//

#import "NoticeCell.h"
#import "Notice.h"
#import "DateMethod.h"

@implementation NoticeCell
@synthesize logoImageView,noticeLabel,timeLabel;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)initWithNotice:(Notice *)notice{
    if (notice.content && notice.content.length > 0) {
        noticeLabel.textColor = [UIColor lightGrayColor];
    }
    else{
        noticeLabel.textColor = [UIColor blackColor];
    }
    noticeLabel.text = notice.title;
    timeLabel.text = [DateMethod changeDateToMMddTimeToString:notice.time];
   }
@end
